<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:zj="http://www.zju.edu.cn">
  <xsl:import href="../Tk2Base/TransformData.xslt"/>
  <xsl:template name="zj:SetNewTableData">
    <xsl:param name="ResolverData"/>
    <xsl:param name="TableData"/>
    <xsl:variable name="OverrideInfo" select="$ResolverData/zj:InsertAction"/>
    <xsl:variable name="OverrideFieldName" select="$OverrideInfo/Override/Field/@FieldName"/>
    <xsl:variable name="Fields" select="$TableData/zj:Field[zj:FieldName = $OverrideFieldName or zj:Display/@DefaultShow='All' or zj:Display/@DefaultShow='AllNoList' or contains(zj:Display/@DefaultShow, 'Insert')]"/>
    <xsl:call-template name="zj:AddRawField">
      <xsl:with-param name="OverrideInfo" select="$OverrideInfo"/>
    </xsl:call-template>
    <xsl:apply-templates select="$Fields" mode="zj:RawData">
      <xsl:with-param name="OverrideInfo" select="$OverrideInfo"/>
      <xsl:with-param name="Fields" select="$Fields"/>
    </xsl:apply-templates>
  </xsl:template>
</xsl:stylesheet>
